package com.design.decoratorPattern;

/**
 * 装饰器模式
 * 输入输出流也经常使用这个模式
 */
public class DecoratorPattern {
    public static void main(String[] args) {
        System.out.println("=========一代机器人==========");
        Robot robot = new FirstRobot();
        robot.print();
        robot.doSomething();
        System.out.println("=========二代机器人==========");
        new RobotDecorator(new FirstRobot()).doMoreThings();
    }
}


